package com.redpig.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 表属性 实体类
 *
 * @author zqd
 *
 * @date 2023-07-13 13:05:02
 */
@Data
@TableName(value = "redpig_sys_table_property")
@ApiModel(description = "表属性")
public class TableProperty{

    /** 主键ID **/
    @ApiModelProperty(value = "主键ID", position = 1)
    @TableId(value = "id",type = IdType.AUTO)
    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    private Long id;

    /** 创建时间 **/
    @ApiModelProperty(value = "创建时间", position = 3)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "createTime",fill = FieldFill.INSERT)
    private java.util.Date createTime;

    /** 更新时间 **/
    @ApiModelProperty(value = "更新时间", position = 4)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "updateTime",fill = FieldFill.INSERT_UPDATE)
    private java.util.Date updateTime;

    /** 字段名 **/
    @ApiModelProperty(value = "字段名", position = 5)
    @TableField(value = "columnName")
    private String columnName;

    /** 字段类型 **/
    @ApiModelProperty(value = "字段类型", position = 6)
    @TableField(value = "columnType")
    private String columnType;

    /** 列长度 **/
    @ApiModelProperty(value = "列长度", position = 5)
    @TableField(value = "columnLength")
    private Integer columnLength;

    /** 字段说明 **/
    @ApiModelProperty(value = "字段说明", position = 7)
    @TableField(value = "columnComment")
    private String columnComment;

    /** 不为空 **/
    @ApiModelProperty(value = "不为空", position = 8)
    @TableField(value = "not_null")
    private Boolean notNull;

    /** 主键 **/
    @ApiModelProperty(value = "主键", position = 9)
    @TableField(value = "primarykey")
    private Boolean primarykey;

    /** 属性名 **/
    @ApiModelProperty(value = "属性名", position = 8)
    @TableField(value = "fieldName")
    private String fieldName;

    /** 属性类型 **/
    @ApiModelProperty(value = "属性类型", position = 9)
    @TableField(value = "fieldType")
    private String fieldType;

    /** 查询 **/
    @ApiModelProperty(value = "查询", position = 10)
    @TableField(value = "select_is")
    private Boolean selectIs;

    /** 查询方式 **/
    @ApiModelProperty(value = "查询方式", position = 11)
    @TableField(value = "select_type")
    private String selectType;

    /** 表单 **/
    @ApiModelProperty(value = "表单", position = 12)
    @TableField(value = "form_is")
    private Boolean formIs;

    /** 必填 **/
    @ApiModelProperty(value = "必填", position = 13)
    @TableField(value = "input_must")
    private Boolean inputMust;

    /** 表单类型 **/
    @ApiModelProperty(value = "表单类型", position = 14)
    @TableField(value = "form_type")
    private String formType;

    /** 排序 **/
    @ApiModelProperty(value = "排序", position = 15)
    @TableField(value = "seq")
    private Integer seq;

    /** 所属表 **/
    @ApiModelProperty(value = "所属表", position = 17)
    @TableField(value = "tableInfo_id")
    private Long tableInfoId;

    /** 创建者 **/
    @ApiModelProperty(value = "创建者", position = 6)
    @TableField(value = "create_by",fill = FieldFill.INSERT)
    private String createBy;

    /** 更新者 **/
    @ApiModelProperty(value = "更新者", position = 7)
    @TableField(value = "update_by",fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    /** 备注 **/
    @ApiModelProperty(value = "备注", position = 19)
    @TableField(value = "remark")
    private String remark;

}
